import request from '@/utils/request'

// 查询商品列表
export function listAGoods(query) {
  return request({
    url: '/aGoods/aGoods/list',
    method: 'get',
    params: query
  })
}
export function listAGoodsNoPage(query) {
  return request({
    url: '/aGoods/aGoods/listAGoodsNoPage',
    method: 'get',
    params: query
  })
}

// 查询商品详细
export function getAGoods(goodsId) {
  return request({
    url: '/aGoods/aGoods/' + goodsId,
    method: 'get'
  })
}

// 新增商品
export function addAGoods(data) {
  return request({
    url: '/aGoods/aGoods',
    method: 'post',
    data: data
  })
}

// 修改商品
export function updateAGoods(data) {
  return request({
    url: '/aGoods/aGoods',
    method: 'put',
    data: data
  })
}

// 删除商品
export function delAGoods(goodsId) {
  return request({
    url: '/aGoods/aGoods/' + goodsId,
    method: 'delete'
  })
}
